POV-Ray : Newsgroups : povray.animations : Animation Control (time frames I Guess) : Re: Animation Control (time frames I Guess) Server Time
29 Jun 2024 07:37:28 EDT (-0400)
  Re: Animation Control (time frames I Guess)  
From: Hughes, B 
Date: 14 Sep 2003 03:46:00
Message: <3f641cb8$1@news.povray.org>
"Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
news:Xns### [at] 204213191226...
>
> During an animation sequence, if an object is to:
>
>     do something for 2 seconds
>     stay idle for 3 seconds
>     do something for 3 seconds
>
> Assuming:
>
>     +kff???
>     +ki0 (default)
>     +kf1 (default)
>     And that we encode the final animation at 25 fps.
>
> Would one use something like this to figure out where in time
> we are?
>
> #declare T = frame_number / 25 ;
>
> #if ( T<2 | ( T>5 & T<8 ) )
>     do something
> #end

Seems okay to me. There's #range, used in #switch directive, that I might
use for this kind of purpose too. Goes like so:

#switch (T)
#range (0,2)
/* do first thing */
#break
#range (5,8)
/* do second thing */
#break
#end

Except this wouldn't prevent the exact values 2, 5 and 8 from being taken
into account; unlike your #if directive method, which I'd say is perfectly
fine in that particular example. You just don't need the parenthesis around
T>5&T<8 for it to work right, I believe.

Bob H.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.